/*
 * TestTask.cpp
 *
 *  Created on: 16.12.2014
 *      Author: Jonas
 */

#include "TestTask.h"

TestTask::TestTask(Status* statusPtr, uint8_t defaultPrio) :
		Task(statusPtr, defaultPrio) {
	counter = 0;
	led = LED3;
}

void TestTask::update() {

	STM_EVAL_LEDOn(led);

	for (uint32_t i = 0; i < counter; i++) {
		__asm__("nop");
	}
	priority = defaultPriority;

	STM_EVAL_LEDOff(led);

}

void TestTask::setCounter(uint32_t counterValue) {
	counter = counterValue;
}

void TestTask::setLED(Led_TypeDef boardled) {
	led = boardled;
	STM_EVAL_LEDInit(led);
}

TestTask::~TestTask() {
	// TODO Auto-generated destructor stub
}

